package com.bocloud.cmp.entity.resource;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.bocloud.common.utils.DateSerializer;
import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreInsert;
import com.bocloud.entity.annotations.IgnoreUpdate;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * 机房类
 * 
 * @author wei wei
 * @version 1.0
 * @since 2016.02.26
 */
@Table("room")
public class Room extends GenericEntity {

	@PK(value = PKStrategy.AUTO)
	private Long id; // ID
	@Column("location_sn")
	private String locationSn; // 位置编号
	@Column("contact_phone")
	private String contactPhone; // 联系电话
	@Column("contacter")
	private String contacter; // 联系人
	@Column("type")
	private String type; // 机房类型
	@IgnoreInsert
	@IgnoreUpdate
	private String typeName;
	@Column("commission_date")
	@JsonSerialize(using = DateSerializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date commissionDate; // 投产日期
	@Column("total_area")
	private String totalArea; // 总面积
	@Column("row_num")
	private Integer rowNum;
	@Column("col_num")
	private Integer colNum;
	@Column("dc_id")
	private Long dcId; // 数据中心ID
	@IgnoreInsert
	@IgnoreUpdate
	private String dcname; // 数据中心名称
	@IgnoreInsert
	@IgnoreUpdate
	private Integer rooms; // 机房数量
	@IgnoreInsert
	@IgnoreUpdate
	private Integer racks; // 机柜数量
	@IgnoreInsert
	@IgnoreUpdate
	private Integer servers; // 服务器数量

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the locationSn
	 */
	public String getLocationSn() {
		return locationSn;
	}

	/**
	 * @param locationSn
	 *            the locationSn to set
	 */
	public void setLocationSn(String locationSn) {
		this.locationSn = locationSn;
	}

	/**
	 * @return the contactPhone
	 */
	public String getContactPhone() {
		return contactPhone;
	}

	/**
	 * @param contactPhone
	 *            the contactPhone to set
	 */
	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}

	/**
	 * @return the contacter
	 */
	public String getContacter() {
		return contacter;
	}

	/**
	 * @param contacter
	 *            the contacter to set
	 */
	public void setContacter(String contacter) {
		this.contacter = contacter;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the typeName
	 */
	public String getTypeName() {
		return typeName;
	}

	/**
	 * @param typeName
	 *            the typeName to set
	 */
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	/**
	 * @return the commissionDate
	 */
	public Date getCommissionDate() {
		return commissionDate;
	}

	/**
	 * @param commissionDate
	 *            the commissionDate to set
	 */
	public void setCommissionDate(Date commissionDate) {
		this.commissionDate = commissionDate;
	}

	/**
	 * @return the totalArea
	 */
	public String getTotalArea() {
		return totalArea;
	}

	/**
	 * @param totalArea
	 *            the totalArea to set
	 */
	public void setTotalArea(String totalArea) {
		this.totalArea = totalArea;
	}

	/**
	 * @return the rowNum
	 */
	public Integer getRowNum() {
		return rowNum;
	}

	/**
	 * @param rowNum
	 *            the rowNum to set
	 */
	public void setRowNum(Integer rowNum) {
		this.rowNum = rowNum;
	}

	/**
	 * @return the colNum
	 */
	public Integer getColNum() {
		return colNum;
	}

	/**
	 * @param colNum
	 *            the colNum to set
	 */
	public void setColNum(Integer colNum) {
		this.colNum = colNum;
	}

	/**
	 * @return the dcId
	 */
	public Long getDcId() {
		return dcId;
	}

	/**
	 * @param dcId
	 *            the dcId to set
	 */
	public void setDcId(Long dcId) {
		this.dcId = dcId;
	}

	/**
	 * @return the dcname
	 */
	public String getDcname() {
		return dcname;
	}

	/**
	 * @param dcname
	 *            the dcname to set
	 */
	public void setDcname(String dcname) {
		this.dcname = dcname;
	}

	/**
	 * @return the rooms
	 */
	public Integer getRooms() {
		return rooms;
	}

	/**
	 * @param rooms
	 *            the rooms to set
	 */
	public void setRooms(Integer rooms) {
		this.rooms = rooms;
	}

	/**
	 * @return the racks
	 */
	public Integer getRacks() {
		return racks;
	}

	/**
	 * @param racks
	 *            the racks to set
	 */
	public void setRacks(Integer racks) {
		this.racks = racks;
	}

	/**
	 * @return the servers
	 */
	public Integer getServers() {
		return servers;
	}

	/**
	 * @param servers
	 *            the servers to set
	 */
	public void setServers(Integer servers) {
		this.servers = servers;
	}
}
